FROM php:7.4-fpm
MAINTAINER YULIYA <2545757609@qq.com>

# COPY www_php /var/www/html
# COPY Dockerfile/crontab/cron-file /var/www/cron-file
# COPY php/php74/php.ini /usr/local/etc/php/php.ini

RUN sed -i "s@http://deb.debian.org@http://mirrors.163.com@g" /etc/apt/sources.list \
    && rm -Rf /var/lib/apt/lists/* \
    && apt-get upgrade \
    && apt-get update \
    && apt-get install -y \
    libmagickcore-dev \
    libmagickwand-dev \
    imagemagick \
    libfreetype6-dev \
    libjpeg62-turbo-dev \
    libmcrypt-dev \
    libpng-dev \
    libzip-dev \
    libwebp-dev \
    && docker-php-ext-configure gd  --with-webp=/usr/include/webp --with-jpeg=/usr/include --with-freetype=/usr/include/freetype2/ \
    && docker-php-ext-install -j$(nproc) gd iconv pdo_mysql mysqli bcmath exif gettext sockets dba pcntl shmop sysvmsg sysvsem sysvshm \
    && pecl install redis \
    && pecl install mcrypt \
    && pecl install swoole \
    #&& apt-get install -y cron \
    #&& service cron start \
    #&& apt-get install -y vim \
    #&& crontab /var/www/cron-file \
    #&& apt-get install -y rsyslog \
    #&& echo "cron.* /var/log/cron.log" > /etc/rsyslog.d/50-default.conf \
    #&& apt-get clean
